<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Main extends CI_Controller {

	public function __construct()
	{
		parent::__construct();
		
		$this->load->helper(array('url','cookie','html','language','security'));
		$this->load->library(array('parser','session','user_agent','pagination','encrypt'));
		
		
		$uagent = do_hash($this->agent->browser());
		$platform = do_hash($this->agent->platform());
		
		if($this->input->cookie('dsn_platform') == '' OR $this->input->cookie('dsn_agent') == '')
		{
			$dsn_platform = array(
				'name'   => 'dsn_platform',
				'value'  => $platform,
				'expire' => '86500',
				'path'   => '/',
				'secure' => FALSE
			);
			
			$this->input->set_cookie($dsn_platform); 
			
			$dsn_agent = array(
				'name'   => 'dsn_agent',
				'value'  => $uagent,
				'expire' => '86500',
				'path'   => '/',
				'secure' => FALSE
			);
			$this->input->set_cookie($dsn_agent); 
			
		}
		
		//$lang = $this->session->userdata('dsn_lang');
		//if($lang == "id"){
			//$this->lang->load('indonesia', 'indonesia');
		//}else{
			//$this->lang->load('english', 'english');
		//}
		
		//$this->lang->load('indonesia', 'indonesia');
		$this->load->model('Main_model','mainmodel',TRUE);
		
		
	}
	   
	public function index()
	{
		$this->load->view('main/index');
	}
	
	public function produk()
	{
		$this->load->view('main/produk');
	}
	
	public function profil()
	{
		$this->load->view('main/profil');
	}
	
	public function kontak()
	{
		$this->load->view('main/kontak');
	}
	
	public function usaha()
	{
		$this->load->view('main/perusahaan');
	}
	
	public function kategori()
	{
		$this->load->view('main/kategori');
	}
	
	public function loker()
	{
		$this->load->view('main/loker');
	}
	
	public function detail()
	{
		$this->load->view('main/detail');
	}
	
	public function login()
	{
		$this->load->view('main/login');
	}
	
	public function acara()
	{
		$this->load->view('main/acara');
	}
	
	public function kirimkode()
	{
		$this->load->view('main/kirimkode');
	}
	
	public function kebijakan()
	{
		$this->load->view('main/kebijakan');
	}
	
	public function masukan()
	{
		$this->load->view('main/masukan');
	}
	
	public function lapor()
	{
		$this->load->view('main/lapor');
	}
	
	public function pdf()
	{
		$this->load->library('cezpdf');
		$this->load->view('main/pdf');
	}
	
	public function daftar()
	{
		$this->load->view('main/daftar');
	}
	
	public function lupapass()
	{
		$this->load->view('main/lupapass');
	}
	
	public function search()
	{
		$this->load->view('main/search');
	}
	
	public function blog()
	{
		$this->load->view('main/blog');
	}
	
	
}

/* End of file main.php */
/* Location: ./application/controllers/main.php */
